package com.customer.crm.business.pojo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.ibatis.type.Alias;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * @author: zlq
 * @create : 2021/12/21
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("tb_crm_business")
@Alias("business")
public class Business implements Serializable {
    private Integer id;
    private String bname;
    private String origin;
    private String type;
    @TableField("estimate_price")
    private Integer estimatePrice;
    @TableField("customer_id")
    private Integer customerId;
    @TableField("creator_user_id")
    private String creatorUserId;
    @TableField("owner_user_id")
    private String ownerUserId;
    @TableField("gain_rate")
    private Integer gainRate;
    @TableField("total_amount")
    private Integer totalAmount;
    @TableField("subtotal_val")
    private float subtotalVal;
    @TableField("discount_price")
    private float discountPrice;
    @TableField("sales_price")
    private float salesPrice;
    @TableField("due_date")
    private Long dueDate;
    @TableField(fill = FieldFill.INSERT, value = "create_time")
    private LocalDateTime createTime;
    @TableField(fill=FieldFill.UPDATE,value="update_time")
    private LocalDateTime updateTime;
    @TableField("update_user_id")
    private String updateUserId;
    @TableField("status_id")
    private Integer statusId;
    @TableField("total_price")
    private float totalPrice;
    @TableField("nextstep")
    private String nextstep;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @TableField("nextstep_time")
    private Date nextstepTime;
    @TableLogic(value = "1", delval = "0")
    @TableField("delete_status")
    private Integer deleteStatus;
    @TableField("delete_user_id")
    private String deleteUserId;
    @TableField("delete_time")
    private Long deleteTime;
    @TableField("contacts_id")
    private Integer contactsId;
    @TableField("contract_address")
    private String contractAddress;
    private String description;
}
